﻿using UnityEngine;
using System.Collections;

public class EventLight:EventTweenBase{
	public Light m_Target;
	public FloatEvent TargetIntensity;
	public ColorEvent TargetColor;
	public void Start(){
		if (m_Target == null)
			GameObject.Destroy (this);
		if (m_PlayStart)
			UpdateColor (0);
	}
	protected override void UpdateEvent(){
		UpdateColor (EventTime);
	}
	public void UpdateColor(float time){
		m_Target.intensity = TargetIntensity.Lerp (easyType, time);
		m_Target.color = TargetColor.Lerp (easyType, time);
	}
}
